// Created by liusc on 2020/7/28--11:17.
<template>
  <div class="margin-box">
    <list-page
      :pager="pager"
      :data="tableData"
      :showSelectSearch="false"
      :placeholder="placeholder"
      @searchByKey="searchByKey"
      @changePageSize="changePageSize"
      @changeCurrentPage="changeCurrentPage"
    >
      <template slot="table">
        <el-table :data="tableData" align="center" @selection-change="selectionChange">
          <!--                    <el-table-column type="selection" width="55"></el-table-column>-->
          <el-table-column label="预算编号" prop="budgetCode"></el-table-column>
          <el-table-column label="申请名称" prop="applyName"></el-table-column>
          <el-table-column label="申请开始时间" prop="applyStart"></el-table-column>
          <el-table-column label="申请结束时间" prop="applyEnd"></el-table-column>
          <el-table-column label="备注" prop="remarks"></el-table-column>
          <el-table-column width="100px" label="操作">
            <template slot-scope="scope">
              <el-button type="text" v-if="edit_button && scope.row.budgetType==11 && scope.row.isAmendment==0" @click="toAddData(scope)">发起</el-button>
              <el-button type="text" v-if="edit_button && scope.row.budgetType==11 && scope.row.isAmendment==1" @click="toEditData(scope)">编辑</el-button>
              <!--                            <el-button type="text" @click="deleteRow(scope)">-->
              <!--                                <span class="text-danger">删除</span>-->
              <!--                            </el-button>-->
            </template>
          </el-table-column>
        </el-table>

        <amendAdd ref="amendAdd" @addData="addData" @query="getListData"></amendAdd>
        <amendEdit ref="amendEdit" @updateData="updateData" @query="getListData"></amendEdit>
      </template>
    </list-page>
  </div>
</template>

<script src="./amend_list.js"></script>
<style scoped lang="scss">
@import "./amend_list";
</style>

